package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PropertyHouseMapper;
import com.ruoyi.system.domain.PropertyHouse;
import com.ruoyi.system.service.IPropertyHouseService;

/**
 * 房屋档案Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-27
 */
@Service
public class PropertyHouseServiceImpl implements IPropertyHouseService 
{
    @Autowired
    private PropertyHouseMapper propertyHouseMapper;

    /**
     * 查询房屋档案
     * 
     * @param houseId 房屋档案主键
     * @return 房屋档案
     */
    @Override
    public PropertyHouse selectPropertyHouseByHouseId(Long houseId)
    {
        return propertyHouseMapper.selectPropertyHouseByHouseId(houseId);
    }

    /**
     * 查询房屋档案列表
     * 
     * @param propertyHouse 房屋档案
     * @return 房屋档案
     */
    @Override
    public List<PropertyHouse> selectPropertyHouseList(PropertyHouse propertyHouse)
    {
        return propertyHouseMapper.selectPropertyHouseList(propertyHouse);
    }

    /**
     * 新增房屋档案
     * 
     * @param propertyHouse 房屋档案
     * @return 结果
     */
    @Override
    public int insertPropertyHouse(PropertyHouse propertyHouse)
    {
        propertyHouse.setCreateTime(DateUtils.getNowDate());
        return propertyHouseMapper.insertPropertyHouse(propertyHouse);
    }

    /**
     * 修改房屋档案
     * 
     * @param propertyHouse 房屋档案
     * @return 结果
     */
    @Override
    public int updatePropertyHouse(PropertyHouse propertyHouse)
    {
        return propertyHouseMapper.updatePropertyHouse(propertyHouse);
    }

    /**
     * 批量删除房屋档案
     * 
     * @param houseIds 需要删除的房屋档案主键
     * @return 结果
     */
    @Override
    public int deletePropertyHouseByHouseIds(Long[] houseIds)
    {
        return propertyHouseMapper.deletePropertyHouseByHouseIds(houseIds);
    }

    /**
     * 删除房屋档案信息
     * 
     * @param houseId 房屋档案主键
     * @return 结果
     */
    @Override
    public int deletePropertyHouseByHouseId(Long houseId)
    {
        return propertyHouseMapper.deletePropertyHouseByHouseId(houseId);
    }
}
